package com.tjmc.tiomsresource.service.impl;

import com.tjmc.tiomscore.dao.TranPtnHwEthMapper;
import com.tjmc.tiomscore.model.TranPtnHwEth;
import com.tjmc.tiomsresource.parser.CMEthParser;
import com.tjmc.tiomsresource.service.CMEthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @author Luc
 * @version 1.0
 * @date 2020-05-20 15:41
 */
@Service("cmEthService")
public class CMEthServiceImpl extends CMSuperServiceImpl<TranPtnHwEth> implements CMEthService {

    @Autowired
    private CMEthParser cmEthParser;
    @Autowired
    private TranPtnHwEthMapper tranPtnHwEthMapper;

    @Override
    public CMEthParser getParser() {
        return cmEthParser;
    }

    @Override
    public TranPtnHwEthMapper getMapper() {
        return tranPtnHwEthMapper;
    }

    @Override
    public boolean saveTranPtnHwDataToDB(List<File> xmlFiles) {
        return this.saveTranPtnHwDataToDB(xmlFiles, "ETH");
    }
}
